package com.tarena.rocketmq.study.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "test-01-topic",
        consumerGroup = "${rocketmq.consumer.group}",selectorExpression = "*" )
public class MyConsumer01 implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        System.out.println("框架消费监听 拿到消息："+message);
    }
}
